<%@ page import="java.util.Date" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>success</title>
</head>
<body>
    <%
        Date date = new Date();
        request.setAttribute("date",date);
    %>
    <h2>success</h2>
    <%=request.getAttribute("rolesList")%><br>
    ${rolesList}<br>
    <c:if test="${!empty rolesList}">
        <h2>有数据可迭代</h2>
    </c:if>
    <hr>
    <c:forEach items="${rolesList}" var="role" varStatus="vs">
        ${vs.count}---${role.id}---${role.roleName}---${vs.current}<br>
    </c:forEach>
    <hr>
    <fmt:formatDate value="${date}" pattern="yyyy年mm月dd日"></fmt:formatDate>
</body>
</html>
